<?php 
	$tlbItem = new Zendvn_Model_Table_ProductCategories();
	$arrItem = $tlbItem->listItemAll($this->arrParam, array('task' => 'main-category'));
	
	$cat_id	= '';
	if($this->arrParam['action'] == 'product-category'){
		$cat_id = $this->arrParam['id'];
	}
	
	if(!empty($arrItem)):
		$newMenu = '';
		$recursive = new Zendvn_Recursive();
		$recursive->recursiveUL($arrItem, 1, $newMenu);
		$newMenu = preg_replace('#<ul[^>]+>(\s+)?</ul>#imsU', '', $newMenu);
?>


	<div class="lev">
     	<div class="category head_menu floatright">
			<?php echo $newMenu?>
     	</div>
  	</div>
<?php endif;?>    

<script>
	$(document).ready(function(){
		var cat_id = '<?php echo $cat_id?>';
		$('li#liMenu_' + cat_id).addClass('active');
		$('li').hover(function(){
			$(this).find('ul:first').slideDown(200);
		},function(){
			$(this).find('ul:first').slideUp(150);
		})
	})
</script>           
